package com.foreknow.demo14;

/**
 *       1 运行时异常(RuntimeException): 非检查性异常(编译时不报错,无需处理,但是运行时报错)
 *         常见的运行时异常: ArrayIndexOutOfBoundsException 数组越界
 *                                    NullPointerException  空指针异常
 */
public class ExceptionDemo1 {
    public static void main(String[] args) {

        try{
            int[] array = {1,2,3,4,5};
            for (int i= 0; i<=array.length;i++){
                System.out.println(array[i]);

            }
        }catch (ArrayIndexOutOfBoundsException e){
            e.getMessage();
        }finally {
            System.out.println("11111111111");
        }

        System.out.println("continue...");
    }
}
